package com.zjw.zy.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/10/12 10:21
 */
public class Weather1Day implements Parcelable {

    @SerializedName("hourly_fcsts")
    public List<HourlyWeather> hourlyFcsts;

    @SerializedName("location")
    public Location location;

    protected Weather1Day(Parcel in) {
        hourlyFcsts = in.createTypedArrayList(HourlyWeather.CREATOR);
        location = in.readParcelable(Location.class.getClassLoader());
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(hourlyFcsts);
        dest.writeParcelable(location, flags);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Weather1Day> CREATOR = new Creator<Weather1Day>() {
        @Override
        public Weather1Day createFromParcel(Parcel in) {
            return new Weather1Day(in);
        }

        @Override
        public Weather1Day[] newArray(int size) {
            return new Weather1Day[size];
        }
    };
}
